﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.UI.WebControls;
using MvcApplication.Models;

namespace MvcApplication.Controllers
{
    public class HomeController : Controller
    {
        private DataContainer myContainer = new DataContainer();

        public ActionResult Index()
        {
            return View(myContainer);
        }

        [HttpPost]
        public ActionResult Index(DataContainer container)
        {
            container.TextCollection.Add(container.TextData);
            return View(container);
        }
    }
}
